/**
 * copyright 2006 © geolabs
 * author : Gérald Fenoy
 */

/**
 * Styler define
 */

Styler=Class.create({
  _unbound: null,
    
    /**
     * Function used to set the opacity of an element.
     */
  setOpacity: function(element,opacity){
      element.style.filter='alpha(opacity='+(opacity*10)+')';
      element.style.opacity=''+(opacity/10)+'';
      element.style.MozOpacity=''+(opacity/10)+'';
      element.style.KhtmlOpacity=''+(opacity/10)+'';
    },

  setPosition: function(element,position){
      element.style.position="absolute";
      element.style.top=""+position.y+"px";
      element.style.left=""+position.x+"px";
    },

  setStyle: function(element,style){
      if(this._unbound)
	element.style.setAttribute("cssText",style);
      else
	element.setAttribute("style",style);
    }

  });

Styler.define({ _init: function(){ } });

el=document.createElement('div');
el.setAttribute('class','__styler');
if(el.className=='')
  Styler._unbound=true;
delete(el);
